VMS Help  —  PASCAL  Data Types, Structured Types, ARRAY  Standard array constructor, Examples
  The following examples show possible constructors for the  array
  Numbers:

  VAR
     Numbers : Count VALUE [1..3,5 : 1; 4,6 : 2; 7..9 : 3; 10 : 6];

  {or, in the executable section}
  Numbers := Count[1..3,5 : 1;  4,6 : 2;  7..9 : 3;  10 : x+3];

  These constructors give the  first,  second,  third,  and  fifth
  component  the value 1; the fourth and sixth component the value
  2; and the seventh, eighth, and ninth components  the  value  3.
  The first constructor gives the tenth component the value 6; the
  second constructor, since it is in the executable  section,  can
  assign the run-time value x+3 to the tenth component.

  Numbers := Count[4,6 : 2;  7..9 : 3;  10 : x+3; OTHERWISE 1];

  To specify constructor values for all  remaining  elements,  you
  can use the OTHERWISE clause.
Close Help